package com.hongyi.controller;

import com.hongyi.common.Result;
import com.hongyi.service.UserRoleService;
import com.hongyi.service.UserService;
import com.hongyi.vo.UserRoleVo;
import com.hongyi.vo.UserVo;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author hongyi
 * @date 2023/11/22 21:16
 */
@RestController
@RequestMapping("/userRole")
@MapperScan("com.hongyi.mapper")
public class UserRoleController {
    @Autowired
    private UserRoleService userRoleService;
       @GetMapping("/userRoleList")
    public Result<List<UserRoleVo>> m5(){
           List<UserRoleVo> list = userRoleService.findAllUserAndRole();
           return Result.success(list);
    }

}
// 127.0.0.0.1:9090/userRole/userRoleList
